<template>
  <div class="hotTJ">
    <div class="hotTao">
      <!-- 热门推荐标题 -->
      <div class="hotUl">
        <div class="v-hd2">
          <div class="yuanquan"></div>
          <!-- <a
            href="javascript:;"
            class="tit f-ff2 f-tdn"
            style="color:#333333"
            @click="goRoute('/find/songlist')"
          >热门推荐</a> -->
          <router-link
            style="color:#333333"
            to='/find/songlist'
            class="tit f-ff2 f-tdn"
          >热门推荐</router-link>
          <div class="tab">
            <router-link
              to='/find/songlist'
              class="s-fc3"
            >
              热门
            </router-link>
            <span class="line">|</span>
            <router-link
              to='/find/songlist'
              class="s-fc3"
            >
              流行
            </router-link>
            <span class="line">|</span>
            <router-link
              to='/find/songlist'
              class="s-fc3"
            >
              摇滚
            </router-link>
            <span class="line">|</span>
            <router-link
              to='/find/songlist'
              class="s-fc3"
            >
              民谣
            </router-link>
            <span class="line">|</span>
            <router-link
              to='/find/songlist'
              class="s-fc3"
            >
              电子
            </router-link>
          </div>
          <span class="more">
            <router-link
              to='/find/songlist'
              class="s-fc3"
            >更多</router-link><i class="cor s-bg s-bg-6">&nbsp;</i>
          </span>
        </div>
      </div>
      <!-- 热门推荐内容 -->

      <div class="HotTjTao">
        <div
          class="TJmusic"
          v-for="item in HotTJ"
          :key="item.id"
        >
          <div class="photo">
            <img
              :src="item.picUrl"
              alt=""
            >
            <!-- 跳转到歌曲详情的地方 -->
            <a href="javascript:;"></a>
          </div>
          <div class="buttom">
            <!-- 点击播放的链继 -->
            <a href="javascript:;"></a>
            <span class="erji"></span>
            <span class="shuliang">{{parseInt(item.playCount/10000)}}万</span>
          </div>
          <p class="butContent">
            <a href="javascript:;">{{item.name}}</a>
          </p>
        </div>
      </div>
    </div>
  </div>
</template>
<script>
export default {
 data: () => ({
   HotTJ:[]
 }),
  created() {
    this.postHotTJ()
  },
  methods: {
    async postHotTJ(){
      try {
        const res=await this.Api.cyzApi.postHotTJ()
        this.HotTJ=res.data.result
      } catch (error) {
        alert("获取热门推荐失败"+error)
      }
    }
  }
};
</script>
<style lang="less">
.hotTJ{
  a{
    cursor: pointer;
    text-decoration: none;
  }
  position: relative;
  font-size: 12px;
  .hotTao{
    .hotUl{
      .v-hd2{
      height: 33px;
        width:90%;
      margin-left: 14px;
      padding: 0 10px 0 34px;
      // background: url('../../../../assets/cyzimgs/xuebitu.png');
      background-position: -225px -156px;
      border-bottom: 2px solid #C10D0C;
      .yuanquan{
        width: 20px;
        height: 20px;
      background: url('../../../../assets/cyzimgs/xuebitu.png');
      background-position: -231px -163px;
      position: absolute;
      left: 10px;
      top: 7px;
      }
      .tit{
        float: left;
        font-size: 20px;
        font-weight: normal;
        line-height: 28px;
        text-decoration: none;
        font-family: "Microsoft Yahei", Arial, Helvetica, sans-serif;
      }
      .tab{
        float: left;
        margin: 7px 0 0 20px;
        a{
          color: #666;
          text-decoration: none;
          cursor: pointer;
        }
        a:hover{
          text-decoration: underline;
        }
        .line{
          margin: 0 10px;
          color: #ccc;
        }
        .cor{
        display: inline-block;
        width: 12px;
        height: 12px;
        margin-left: 4px;
        vertical-align: middle;
        background: url('../../../../assets/cyzimgs/xuebitu.png');
        background-position: 0 -240px;
        }
      }
      .more{
        float: right;
        margin-top: 9px;
        .s-fc3{
          color: #666;
          cursor: pointer;
          text-decoration: none;
        }
      }
      .more:hover{
          text-decoration: underline;
      }
      }
    }
  }

.HotTjTao{
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
.TJmusic{
  margin: 20px 15px 0 15px;
  width: 140px;
    height: 204px;
    float: left;
    display: inline-block;
    overflow: hidden;
    // padding-left: 42px;
    // padding: 0 0 30px 50px;
    line-height: 1.4;
    position: relative;
    .photo{
          width: 140px;
          height: 140px;
              position: relative;
    display: block;
    line-height: 1.4;
    img{
          display: block;
    width: 100%;
    height: 100%;
        border: 0;
    }
    a{
      background-position: 0 0;
      position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: url('../../../../assets/cyzimgs/xuebitu2.png') no-repeat
    }
    }
  }
  .buttom{
    position: absolute;
    top: 115px;
    left: 0px;
    width: 100%;
    height: 27px;
    color: #ccc;
    background: url('../../../../assets/cyzimgs/xuebitu2.png')
     no-repeat;
    background-position: 0px -538px;;

    display: block;
    a{
          position: absolute;
    right: 10px;
    bottom: 5px;
    width: 16px;
    height: 17px;
        display: inline-block;
    background: url('../../../../assets/cyzimgs/xuebitu3.png') 
    no-repeat;
    background-position: 0 0;
    float: right;
    }
    .erji{
      position: absolute;
      top:-1px;
    width: 14px;
    height: 11px;
    margin: 9px 5px 9px 10px;
        display: inline-block;
    background: url('../../../../assets/cyzimgs/xuebitu3.png') no-repeat;
    background-position: 0 -23px;
        color: #ccc;
    }
    .shuliang{
      color:#ccc;
      position: absolute;
      left: 28px;
      top: 6px;
    }
  }
  .butContent{
        margin: 8px 0 3px;
    font-size: 14px;
        width: 100%;
        a{
          display: inline-block;
    max-width: 100%;
    color: #000;
    vertical-align: middle;
        }
        a:hover{
          text-decoration: underline;
        }
  }
}
  
}
</style>